#!/usr/bin/python
# Copyright 2012, Kitware, Inc.

"""Exercise 1: Basic Python"""

import sys

# Define a function named 'sqrt_dict' to compute a dictionary mapping
# the first n integers to the square root of their values.
# e.g. for n=5 the output should be
# {0: 0.0, 1: 1.0, 2: 1.4142135623730951, 3: 1.7320508075688772, 4: 2.0}
#
# Hint you need the 'sqrt' function in the 'math' module.



def main():
    """The main function."""
    # parse the command line argument
    # require exactly 1 argument (argv[0] is the script name)
    if len(sys.argv) != 2:
        print "usage: %s number" % sys.argv[0]
        return

    # convert the command line argument to an interger
    num = int(sys.argv[1])
    # call the function
    values = sqrt_dict(num)
    # print the result
    print values


if __name__ == "__main__":
    main()
